import { default as request, cloud } from '@/framework/utils/request'
export default ({
  fetchList(params) {
    return request({
      url: cloud.dqbasic + '/hrPosition/list',
      method: 'get',
      params
    })
  },
  fetchPage(params) {
    return request({
      url: cloud.dqbasic + '/hrPosition/page',
      method: 'get',
      params
    })
  },
  updateStatus(data) {
    return request({
      url: cloud.dqbasic + '/hrPosition/updateStatus',
      method: 'POST',
      data
    })
  },
  detail(id) {
    return request({
      url: cloud.dqbasic + '/hrPosition/detail',
      method: 'get',
      params: {
        positionId: id
      }
    })
  },
  edit(data) {
    return request({
      url: cloud.dqbasic + '/hrPosition/edit',
      method: 'POST',
      data
    })
  },
  add(data) {
    return request({
      url: cloud.dqbasic + '/hrPosition/add',
      method: 'POST',
      data
    })
  },
  delete(data) {
    return request({
      url: cloud.dqbasic + '/hrPosition/delete',
      method: 'post',
      data
    })
  },
  exportPostion(params) {
    return request({
      url: cloud.dqbasic + '/hrPosition/exportPostion',
      method: 'get',
      params,
      responseType: 'arraybuffer'
    })
  }

})
